//
//  WBBaseWebVC.h
//  WeatherBar
//
//  Created by Bert on 2024/6/17.
//

#import "WBBaseVC.h"
#import "WBWebBar.h"
#import "WKWebViewJavascriptBridge.h"

NS_ASSUME_NONNULL_BEGIN

@interface WBBaseWebVC : WBBaseVC
/// 自定义的导航
@property (nonatomic, strong) WBWebBar *topBar;
@property (nonatomic, strong) WKWebViewJavascriptBridge *bridge;
@property (nonatomic ,strong) NSString *url;
@property (nonatomic ,strong) WKWebView *webView;

- (id)initWithTitle:(NSString *)title gotoUrl:(NSString *)gotoUrl;
- (void)setupUI;
- (void)startRequest;
/// 监听滚动
- (void)observeScrollOffset;
/// 设置左边只有一个返回按钮
- (void)showLeftSingleBack;
/// 设置左边只有一个返回按钮,但是标题滚动时显示
- (void)showLeftSingleBackNotitleTextScroll;
/// 设置左边只有一个返回按钮+透明导航
- (void)showLeftSingleBackTransparent;
/// 设置左边返回和关闭按钮
- (void)showLeftBackClose;
/// 设置右边返回和关闭按钮
- (void)showRightBackClose;
/// 设置左边返回和关闭按钮+透明导航
- (void)showLeftBackTransparent;
/// 显示右边的按钮
- (void)showRightButton;
/// webview背景色
- (void)setBackgroundColor:(UIColor *)color;
///修改webview的Frame
- (void)setWebviewFrame:(CGRect)frame;
/// 显示标题
- (void)showTitle;
- (NSString *)getUrl;
@end

NS_ASSUME_NONNULL_END
